package com.demo.controller;

import com.demo.poji.Account;
import com.demo.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @ClassName AccountController
 * @Description TODO
 * @Author Windy
 * @Date 2022/9/6 20:28
 * @Version 1.0
 **/
@Controller
@RequestMapping("account")
public class AccountController {
    @Autowired
    AccountService accountService;

    @RequestMapping("findAll")
    @ResponseBody
    public List<Account> findAll(){

        System.out.println( accountService.findAll());
        return  accountService.findAll();
    }
}
